<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label for="title" class="control-label col-xs-12 col-sm-2"><i class="text-muted">*</i>标题:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="title" name="row[title]" value="{$row.title}"
                   data-rule="required"/>
        </div>
    </div>

    <div class="form-group">
        <label for="stock" class="control-label col-xs-12 col-sm-2"><i class="text-muted">*</i>可用库存:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="stock" name="row[stock]" value="{$row.stock}"
                   data-rule="required"/>
        </div>
    </div>

    <div class="form-group">
        <label for="attrs" class="control-label col-xs-12 col-sm-2">卡密属性:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input type="text" class="form-control" id="attrs" name="row[attrs]" value="{$row.attrs}" />-->
            <dl class="fieldlist" rel="{$row.attrs|count}" data-name="row[attrs]">
                <dd>
                    <ins>字段名</ins>
                </dd>

                {foreach $row.attrs as $key => $vo}

                <dd class="form-inline">
                    <input type="text" name="row[attrs][]" class="form-control" value="{$vo.key}" size="50"/>
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
                {/foreach}
                <dd><a href="javascript:;" class="append btn btn-sm btn-success"><i class="fa fa-plus"></i>
                    {:__('Append')}</a></dd>
            </dl>
        </div>
    </div>


    <div class="form-group">
        <label for="stock" class="control-label col-xs-12 col-sm-2"><i class="text-muted">*</i>卡密列表:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea class="form-control" id="content" name="row[ticket]" placeholder="按照属性依次排列（用,分割），一行一个" rows="6">{$row.content}</textarea>
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <div class="col-xs-2"></div>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
